use uuid::{uuid,Uuid, Version};
fn main()-> Result<(), Box<dyn std::error::Error>> {
    //生成随机的Uuid
    let uuid = Uuid::new_v4();
    println!("{}",uuid);
    //字面量str转UUID
    const ID: Uuid = uuid!("e4fb0f59-8de3-4af1-be22-e171e5a801d8");
    println!("{ID}");
    //解析uuid
    let my_uuid = Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8")?;
    assert_eq!(Some(Version::Random), my_uuid.get_version());
    Ok(())
}
